package ceyan;
//继承
public class Cat extends Pet{
    //子类调用父类的无参构造方法
    public Cat() {
        super("种族","男",12);
        //输出语句
        System.out.println("猫的基本信息");
System.out.println("姓名为:"+getName()+"\n"+"性别为:"+getSex()+"\n"+"年龄"+getAge());
    }
}
